3.12.62 \(\int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx\) [1162]

Optimal. Leaf size=8 \[ -\sin ^{-1}(5-2 x) \]

[Out]

arcsin(-5+2*x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {55, 633, 222} \begin {gather*} -\sin ^{-1}(5-2 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[3 - x]*Sqrt[-2 + x]),x]

[Out]

-ArcSin[5 - 2*x]

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx &=\int \frac {1}{\sqrt {-6+5 x-x^2}} \, dx\\ &=-\text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,5-2 x\right )\\ &=-\sin ^{-1}(5-2 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(44\) vs. \(2(8)=16\).
time = 0.03, size = 44, normalized size = 5.50 \begin {gather*} \frac {2 \sqrt {-3+x} \sqrt {-2+x} \tanh ^{-1}\left (\frac {\sqrt {-2+x}}{\sqrt {-3+x}}\right )}{\sqrt {-((-3+x) (-2+x))}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[3 - x]*Sqrt[-2 + x]),x]

[Out]

(2*Sqrt[-3 + x]*Sqrt[-2 + x]*ArcTanh[Sqrt[-2 + x]/Sqrt[-3 + x]])/Sqrt[-((-3 + x)*(-2 + x))]

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 2.56, size = 25, normalized size = 3.12 \begin {gather*} \text {Piecewise}\left [\left \{\left \{-2 I \text {ArcCosh}\left [\sqrt {-2+x}\right ],\text {Abs}\left [-2+x\right ]>1\right \}\right \},2 \text {ArcSin}\left [\sqrt {-2+x}\right ]\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[1/((3 - x)^(1/2)*(-2 + x)^(1/2)),x]')

[Out]

Piecewise[{{-2 I ArcCosh[Sqrt[-2 + x]], Abs[-2 + x] > 1}}, 2 ArcSin[Sqrt[-2 + x]]]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(30\) vs. \(2(6)=12\).
time = 0.17, size = 31, normalized size = 3.88

method result size
default \(\frac {\sqrt {\left (-2+x \right ) \left (3-x \right )}\, \arcsin \left (2 x -5\right )}{\sqrt {-2+x}\, \sqrt {3-x}}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3-x)^(1/2)/(-2+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

((-2+x)*(3-x))^(1/2)/(-2+x)^(1/2)/(3-x)^(1/2)*arcsin(2*x-5)

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 6, normalized size = 0.75 \begin {gather*} \arcsin \left (2 \, x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x, algorithm="maxima")

[Out]

arcsin(2*x - 5)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (6) = 12\).
time = 0.30, size = 32, normalized size = 4.00 \begin {gather*} -\arctan \left (\frac {{\left (2 \, x - 5\right )} \sqrt {x - 2} \sqrt {-x + 3}}{2 \, {\left (x^{2} - 5 \, x + 6\right )}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x, algorithm="fricas")

[Out]

-arctan(1/2*(2*x - 5)*sqrt(x - 2)*sqrt(-x + 3)/(x^2 - 5*x + 6))

________________________________________________________________________________________

Sympy [A]
time = 0.79, size = 26, normalized size = 3.25 \begin {gather*} \begin {cases} - 2 i \operatorname {acosh}{\left (\sqrt {x - 2} \right )} & \text {for}\: \left |{x - 2}\right | > 1 \\2 \operatorname {asin}{\left (\sqrt {x - 2} \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-x)**(1/2)/(-2+x)**(1/2),x)

[Out]

Piecewise((-2*I*acosh(sqrt(x - 2)), Abs(x - 2) > 1), (2*asin(sqrt(x - 2)), True))

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 12, normalized size = 1.50 \begin {gather*} -2 \arcsin \left (\sqrt {-x+3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x)

[Out]

-2*arcsin(sqrt(-x + 3))

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 31, normalized size = 3.88 \begin {gather*} -4\,\mathrm {atan}\left (\frac {\sqrt {x-2}-\sqrt {2}\,1{}\mathrm {i}}{\sqrt {3}-\sqrt {3-x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((x - 2)^(1/2)*(3 - x)^(1/2)),x)

[Out]

-4*atan(((x - 2)^(1/2) - 2^(1/2)*1i)/(3^(1/2) - (3 - x)^(1/2)))

________________________________________________________________________________________